//
//  Category.swift
//  APPCore
//
//  Created by raymond Peng on 2018/8/7.
//  Copyright © 2018 TanBaYe. All rights reserved.
//

import Foundation
import Domain

struct GoodsCategory: Decodable {
    let name: String?
    let hot: Bool?
    let id: String?
    let sort: Int?
}

extension GoodsCategory: ICategoryEntity {
    var categoryID: String {
        return id ?? ""
    }

    var categoryName: String {
        return name ?? ""
    }

    var categoryIndex: Int {
        return sort ?? -1
    }
}
